    :root {
            --color-primary: #800000;
            --color-primary-dark: #600000;
            --color-background: #f8f9fa;
            --color-text: #333;
            --color-text-light: #fff;
            --color-link: #1a0dab;
            --color-border: #dfe1e5;
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: Arial, sans-serif;
        }
        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            background-color: #f5f5f5;
            padding-top: 60px;
        }
        .header {
    background-color: #800000;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 1000;
    position: fixed; /* Fixed position */
    top: 0; /* Stick to the top */
    left: 0; /* Align to the left edge */
    width: 100%; /* Full width */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
        .logo {
            cursor: pointer;
            width: auto;
            height: 30px;
            overflow: hidden;
            margin-right: 10px;
        }
       
        .container {
            display: flex;
            flex: 1;
            transition: all 0.3s ease;
        }
        .toggle-sidebar {
            background: none;
            border: none;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
        }
         /* Sidebar styles */
         .sidebar {
            background-color: var(--color-primary-dark);
            color: var(--color-text-light);
            width: 250px;
            position: fixed;
            top: 60px; /* Start the sidebar below the header */
            left: -250px; /* Initially hidden off-screen */
            height: calc(100vh - 60px); /* Full height, minus the header height */
            padding: 20px;
            box-sizing: border-box;
            z-index: 900;
            transition: left 0.3s ease; /* Smooth animation for sliding */
            overflow-y: auto; /* Allow scrolling if content is taller than the viewport */
            background-color:#600000;
            color:white;
        }
        .sidebar.active {
            left: 0; /* Bring the sidebar into view when active */
        }
        .sidebar a {
            display: block;
            padding: 10px;
            color: var(--color-text-light);
            text-decoration: none;
            margin-bottom: 10px;
            border-radius: 4px;
        }
        .sidebar a:hover {
            background-color: var(--color-primary);
        }

        .main-content {
            flex: 1;
            padding: 2rem;
            transition: margin-left 0.3s ease;
            transition: margin-top 0.3s ease; 
        }
        .refine-results.open + .main-content {
    margin-top: 20px; /* Add a margin to main-content when refine-results is open */
}
        .sidebar.closed + .main-content {
            margin-left: 0;
        }

        .search-container {
            margin-bottom: 20px;
            display: flex;
            gap: 10px;
          
        }
        .search-container form {
    display: flex; /* Flexbox layout to align input and button */
    width: 100%; /* Ensure the form takes full width */
}
       .search-input {
    flex: 1; /* This ensures the input takes up all available space */
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%; /* Ensures the input expands to fill its container */
}


        .search-button {
            padding: 12px 24px;
            background-color: #8B0000;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }

        .results-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .results-count {
            color: #595959;
        }
        .filter-dropdown {
            position: relative;
            display: inline-block;
        }

        .filter-button {
            background-color: #f9f9f9;
            color: #333;
            padding: 10px 20px;
            border: 1px solid #ccc;
            cursor: pointer;
            font-size: 16px;
        }

        .filter-content {
            display: none;
            position: absolute;
            right: 0;
            background-color: white;
            min-width: 200px;
            box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
            z-index: 1;
            border: 1px solid #ddd;
            padding: 15px;
        }

        .filter-content input[type="range"] {
            width: 100%;
        }

        .filter-content label {
            display: block;
            margin-bottom: 8px;
            color: #666;
        }

        .filter-dropdown:hover .filter-content {
            display: block;
        }
        .sort-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
            border-top: 1px solid #ddd;
            padding-top: 10px;
            margin-top: 10px;
        }

        .sort-options button {
            background-color: white;
            border: 1px solid #ddd;
            padding: 8px;
            cursor: pointer;
            font-size: 14px;
            text-align: left;
        }

        .sort-options button:hover {
            background-color: #f0f0f0;
        }

        .search-results {
            list-style: none;
            padding: 0;
        }

        .result-item {
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 1px solid #eee;
        }

        .result-title {
            color: #8B0000;
            font-size: 18px;
            margin-bottom: 8px;
            text-decoration: none;
        }

        .result-title:hover {
            text-decoration: underline;
        }

        .result-meta {
            color: #666;
            margin-bottom: 10px;
            font-size: 14px;
        }
        .keywords {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.keyword {
    background-color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    color: #666;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, border 0.3s ease;
    cursor: pointer;
}
.keyword:hover {
    background-color: #8B0000;
    color: white;
    border: 1px solid #8B0000;
}
        .toggle-sidebar {
            background: none;
            border: none;
            color: white;
            font-size: 1.2rem;
            cursor: pointer;
        }
        .controls {
    margin-top: 10px;
}
.cite-link, .save-link {
    color: #8B0000;
    text-decoration: none;
    font-size: 14px;
    margin-right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.cite-link:hover, .save-link:hover {
    background-color: #a20000;
    color: white;
    border-color: #a20000;
}
.cite-link i, .save-link i {
    margin-right: 5px;
}
.pagination {
            margin-top: 20px;
            display: flex;
            justify-content: center;
            gap: 10px;
        }
        .pagination-link {
            padding: 8px 12px;
            border: 1px solid #ccc;
            background-color: #f0f0f0;
            color: #333;
            text-decoration: none;
            font-size: 14px;
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }
        .pagination-link:hover {
            background-color: #ddd;
        }
        .pagination-link.active {
            background-color: #8B0000;
            color: white;
            border-color: #8B0000;
        }

        .filter-options {
    display: none;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 20px;
    justify-content: center;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.filter-group ul {
    list-style: none;
    padding: 0;
}

.filter-group ul li {
    margin-bottom: 8px;
}

.filter-group ul li label {
    font-size: 14px;
    color: #595959;
}

/* When the refine options are visible */
.refine-results.open .filter-options {
    display: flex;
}

@media (max-width: 768px) {
    .filter-options {
        flex-direction: column;
    
    }
    .refine-results {
        margin-top: 20px;
        order: 2; /* Ensure it appears below pagination */
    }
    .pagination {
        order: 1; /* Ensure pagination comes first */
    }

    .refine-results {
        width: 100%;
    }
    .refine-results .filter-options {
        width: 100%;
    }
}
.login-button {
    background-color: white;
    color: maroon;
    border: none;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-left: auto; /* Keep login button pushed to the right */
    

}

.login-button:hover {
    background-color: #0056b3;
}
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Black with opacity */
}
.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);

}
.refine-results .filter-options {
    display: none;
    padding-top: 20px;  /* Add padding to make the content inside the dropdown look better */
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.refine-results .filter-options.open {
    display: block;  /* Show the filter options when the 'open' class is added */
}
.refine-toggle-button {
    background-color: #8B0000;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;  /* To give space between button and the filter options */
}
.refine-toggle-button:hover {
    background-color: #a20000;
}
@media (max-width: 768px) {
}
.refine-button {
    background-color: #8B0000;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 auto; /* Center the button */
    display: block; /* Make the button block-level to center it */
    text-align: center;
    width: 200px; /* Set a fixed width for the button */
}

.apply-filter-btn{
             padding: 6px 16px;
            background-color: #8B0000;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;

}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px; /* Ensure space between logo and toggle button */
}
